import socket

client_socket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
server_addr = ('10.211.211.100',8000)
client_socket.connect(server_addr)

while True:
    send_msg = input('客户端发送数据>>')
    if send_msg == 'quit':
        client_socket.send(send_msg.encode('utf8'))
        break
    client_socket.send(send_msg.encode('utf8'))

    msg = client_socket.recv(1024).decode('utf8')
    print(f'来着服务端IP{server_addr[0]},端口号：{server_addr[1]}:{msg}')

client_socket.close()